package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PWDemo {
    public static void main(String[] args) throws IOException {
        PrintWriter pw = new PrintWriter("pw.txt");
        pw.println("6666");
        pw.println("wwwww");
        pw.close();


       /* //文件流(低级流)
        FileOutputStream fos= new FileOutputStream("pw.txt");


        //转换流(高级流)
        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);

        //缓冲字符流(高级流)
        BufferedWriter bw = new BufferedWriter(osw);

        bw.write("怀抱着你的希望之星");
        System.out.println("写完了");
        bw.close();*/
    }
}
